import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/harry";
// 订单列表
export function listOrder(query) {
  return request({
    url: '/sys/runorder/pageList',
    method: 'post',
    data: query
  })
}
// 订单详情
export function listOrderDetail(tradeNo) {
  return request({
    url: `/sys/runorder/info/${tradeNo}`,
    method: 'get',
    params: ''
  })
}
// 订单列表搜索下拉
export function listOrderOption(query) {
  return request({
    url: '/sys/runorder/pageList/select',
    method: 'get',
    data: query
  })
}
// 订单取消
export function listOrderCancel(tradeNo) {
  return request({
    url: `/sys/runorder/cancel/${tradeNo}`,
    method: 'put',
    params: ''
  })
}
// 猎人完成订单
export function invokeHallTaskConfirmReceived({ no, ...params }) {
  return request({
    url: `/applet/runner/index/arrive/${no}`,
    method: 'post',
    data: params
  })
}
//  客户确认送达
export function invokeOrderConfirm({ tradeNo, flg, ...params }) {
  return request({
    url: `/applet/runOrder/my/info/${tradeNo}/arrive/${flg}`,
    method: 'post',
    data: params
  })
}
// 客户订单详情  获取取件码
export function cuserOrderDetail(tradeNo, params) {
  return request({
    url: `/applet/runOrder/my/info/${tradeNo}`,
    method: 'get',
    params: params
  })
}
